import os
import openpyxl

path = r"C:\Users\Administrator\Desktop"
os.chdir(path)

workbook = openpyxl.load_workbook('高二8班座位表11月12日起.xlsx')
sheet = workbook.active
print('sheet : ',str(sheet),end='')
time=int(input('how many times?'))
for i in range(time):

    sheet.move_range('H4:H9',rows=0 ,cols=-7 )
    sheet.move_range('A4:G4',rows=6,cols=0)
    sheet.move_range('A4:G10',rows=-1,cols=1)

name=input('new name:')
workbook.save(name+'.xlsx')
print('Done.')
